package a.student.dto;

import a.student.library.BaseDto;
import android.database.Cursor;

public class Student extends BaseDto{
	
	private int studentId;
	private String studentName;
	private String address;
	
	public static final String TABLE_NAME = "student";

	public static final String STUDENT_ID = "student_id";

	public static final String STUDENT_NAME = "student_name";

	public static final String ADDRESS = "address";

	public static final String[] COLUMNS = new String[]{STUDENT_ID, STUDENT_NAME, ADDRESS};

	public static final String DEFAULT_SORT_ORDER = STUDENT_ID + " ASC";
	
	public Student() {
		super();
	}
	
	public Student(Cursor c) {
		super();
		this.studentId = c.getInt(c.getColumnIndex(STUDENT_ID));;
		this.studentName = c.getString(c.getColumnIndex(STUDENT_NAME));;
		this.address = c.getString(c.getColumnIndex(ADDRESS));;
	}
	
	public Student(int studentId, String studentName, String address) {
		super();
		this.studentId = studentId;
		this.studentName = studentName;
		this.address = address;
	}

	public int getStudentId() {
		return studentId;
	}

	public void setStudentId(int studentId) {
		this.studentId = studentId;
	}

	public String getStudentName() {
		return studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
}
